/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __UART_H
#define __UART_H

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <malloc.h>
#include <termios.h>
#include <stdarg.h>
#include <fcntl.h>
#include <pthread.h>
#include <signal.h>
#include <errno.h>

#include <sys/stat.h>
#include <sys/types.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/ioctl.h>

#define UART_PORT "/dev/ttyUSB1"


#define UART_BUFFER_LEN 1024

extern int UART_FD;

extern uint8_t uart_init(char *uart_port, uint32_t baudRate, uint8_t wordlength, char parity, uint8_t stopBit);
extern uint8_t uart_destory(void);
extern uint16_t serial_recv(uint8_t *buffer, uint16_t len);
extern uint16_t serial_send(uint8_t *buffer, uint16_t len);



#endif /* __UART_H */
